 <?php                                                                                              
    $csspath = 'news/news.css';
    //$jspath = 'examination/examination.js';
 ?>
<?php require_once VIEWPATH.'common/header.php'; ?>
<?php require_once VIEWPATH.'common/sidebar.php'; ?>
<!--main content start-->
 <style type="text/css">
    .Q_list_box{
        width:100%;
        margin: 1% 2%;
    }
     .Q_list_th{
         height: 30px;
         line-height: 30px;
         border-bottom: 1px dashed #ccc;
         padding: 0 10px;;
     }
    .Q_list_td{
        height: 30px;
        line-height: 30px;
        /*border-bottom: 1px dashed #ccc;*/
        padding: 0 10px;;
    }
 </style>
<section id="main-content">
    <section class="wrapper site-min-height">
    <h3><i class="fa fa-angle-right"></i> 我的学习记录</h3>
        <div class="row mt">
            <div class="col-md-12">
              <div class="content-panel">
                  <div class="main">
                      <div style="overflow: hidden; min-height: 500px;">

                         <div class="news_wh_con">
                           <div class=" news_mokuai" style="width: 83%; position: relative">
                               <table class="Q_list_box">
                                   <thead>
                                        <tr>
                                            <td class="Q_list_th">标题</td>
                                            <td class="Q_list_th">播放进度</td>
                                            <td class="Q_list_th">观看时间</td>
                                        </tr>
                                   </thead>
                                   <tbody>
                                   <?php if($recordList):?>
                                   <?php foreach ($recordList as $key => $value):?>
                                       <tr>
                                           <td class="Q_list_td">
                                               <a href="/video/detail?id=<?=$value['id']?>"><?=$value['title']?></a>
                                           </td>
                                           <td class="Q_list_td"><?=intval($value['playtime']/$value['duration']*100)?>%</td>
                                           <td class="Q_list_td"><?=date("Y-m-d:h:i:s",$value['updatetime'])?></td>
                                       </tr>
                                   <?php endforeach;?>
                                   <?php else:?>
                                       <tr>
                                           <td colspan="4" rowspan="3">暂时没数据</td>
                                       </tr>
                                   <?php endif;?>
                                   </tbody>
                               </table>
                            </div>
                          </div>
                     </div>
                  </div>
              </div>
            </div><!-- /content-panel -->
        </div><!-- /row -->
  </section>
</section>
<?php require_once VIEWPATH.'common/footer.php'; ?>
<script type="text/javascript">
  $(".download").click(function(){
    var docpath = $(this).attr("data");
    var filename = $(this).attr("filename");
    window.open("/document/fileDown?docpath="+docpath+"&filename="+filename);
  });
</script>
